package com.example.starseas_phone;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.TextView;

import com.example.starseas_phone.Entity.Apply;
import com.example.starseas_phone.Entity.Students;

import java.text.SimpleDateFormat;
import java.util.Date;

public class AddStu_detailsActivity extends AppCompatActivity {

    private String TAG = "AddStu_detailsActivity测试";

    private TextView addstu_details_StuName;
    private TextView addstu_details_StuNational;
    private TextView addstu_details_Stusex;
    private TextView addstu_details_StuAge;
    private TextView addstu_details_StuPoliticalLandscape;
    private TextView addstu_details_StuNativePlace;
    private TextView addstu_details_Stucarid;
    private TextView addstu_details_StuPhone;
    private TextView addstu_details_StuEmail;
    private TextView addstu_details_StuClassId;
    private TextView addstu_details_StubackTime;
    private TextView addstu_details_StateOfTheSchool;
    private TextView addstu_details_Title;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_add_stu_details);
        initid();
        Intent intent = getIntent();
        Students students = (Students) intent.getSerializableExtra("students");
        String str = intent.getStringExtra("str");
        addstu_details_Title.setText(str);
        initview(students);
    }

    private void initid(){
        addstu_details_StuName = (TextView) findViewById(R.id.addstu_details_StuName);
        addstu_details_StuNational = (TextView) findViewById(R.id.addstu_details_StuNational);
        addstu_details_Stusex = (TextView) findViewById(R.id.addstu_details_Stusex);
        addstu_details_StuAge = (TextView) findViewById(R.id.addstu_details_StuAge);
        addstu_details_StuPoliticalLandscape = (TextView) findViewById(R.id.addstu_details_StuPoliticalLandscape);
        addstu_details_StuNativePlace = (TextView) findViewById(R.id.addstu_details_StuNativePlace);
        addstu_details_Stucarid = (TextView) findViewById(R.id.addstu_details_Stucarid);
        addstu_details_StuPhone = (TextView) findViewById(R.id.addstu_details_StuPhone);
        addstu_details_StuEmail = (TextView) findViewById(R.id.addstu_details_StuEmail);
        addstu_details_StuClassId = (TextView) findViewById(R.id.addstu_details_StuClassId);
        addstu_details_StubackTime = (TextView) findViewById(R.id.addstu_details_StubackTime);
        addstu_details_StateOfTheSchool = (TextView) findViewById(R.id.addstu_details_StateOfTheSchool);

        addstu_details_Title = (TextView) findViewById(R.id.addstu_details_Title);

    }

    private void initview(Students students){
        addstu_details_StuName.setText(students.getStuName());
        addstu_details_StuNational.setText(students.getNational());
        addstu_details_Stusex.setText(students.getStuSex());
        addstu_details_StuAge.setText(students.getStuAge()+"");
        addstu_details_StuPoliticalLandscape.setText(students.getPoliticalLandscape());
        addstu_details_StuNativePlace.setText(students.getNativePlace());
        addstu_details_Stucarid.setText(students.getStuCarid());
        addstu_details_StuPhone.setText(students.getStuPhone());
        addstu_details_StuEmail.setText(students.getStuEmail());
        addstu_details_StuClassId.setText(students.getStuClassId());
        addstu_details_StubackTime.setText(students.getStubackTime());
        addstu_details_StateOfTheSchool.setText(students.getStateOfTheSchool());
    }

}